<!-- 参考官方文档 -->
<template>
    <view class="">
        <button @click="onGet">获取</button>
    </view>
</template>

<script lang="ts" setup>
    function onGet() {
        //获取小程序胶囊按钮布局
        let res = uni.getMenuButtonBoundingClientRect();
        console.log(res);
    };
</script>

<style lang="scss" scoped>

</style>